package com.yh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.yh.bean.Plan;
import com.yh.dao.PlanDao;
import com.yh.service.PlanService;

@Service("plan")
public class PlanServiceImpl implements PlanService{
	
	@Autowired
	private PlanDao planDao;
	
	@Override
	public List<Plan> queryplan(int pl_userid) {
		// TODO Auto-generated method stub
		List<Plan> plist=planDao.queryplan(pl_userid);
		return plist;
	}
	
	@Override
	public int insertplan(Plan plan) {
		// TODO Auto-generated method stub
		int a=planDao.insertplan(plan);
		return a;
	}

	@Override
	public Plan showplan(int pl_id) {
		// TODO Auto-generated method stub
		Plan plan=planDao.showplan(pl_id);
		return plan;
	}

	@Override
	public int updatestate(int pl_id) {
		// TODO Auto-generated method stub
		int a =planDao.updatestate(pl_id);
		return a;
	}

	@Override
	public int updateplan(Plan plan) {
		// TODO Auto-generated method stub
		int a =planDao.updateplan(plan);
		return a;
	}

	@Override
	public int deleteplan(String[] arr){
		int aa=planDao.deleteplan(arr);
		return aa;
	}
}
